<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <input type="text" v-model="num">
    <button @click="add">点我</button><br>  <!--@==v-on-->
    <button @click="num++">点这加车</button>
    <h2>{{name}}很帅, 有{{num}}辆车</h2>

    <div style="width: 100px;height: 100px; background-color: antiquewhite"
    @click.stop="print('div==')">
        div
        <button @click.stop="print('button')">dianwo</button>
        <a href="http://www.baidu.com" @click.prevent="print('百度')">百度以下</a>

    </div>
</div>
    <script src="../node_modules/vue/dist/vue.js"></script>
    <script type="text/javascript" >
    	let aaa = new Vue({
            el:"#app",//el
            data:{
                name:"大米",
                num:10,
            },
            methods:{
                add(){
                    console.log(this);
                    console.log("hello");
                },
                print(msg) {
                    console.log(msg)
                }
            },
            created() {
                 this.name="帅米";
            }
        });
    </script>

</body>
</html>